package bookez.view.bean.backing;

import java.util.Locale;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;

import bookez.view.util.FacesUtil;

@ManagedBean
@ViewScoped
public class LocaleChanger extends BaseBackingBean {

	public void englishAction() {
		FacesContext context = FacesUtil.getFacesContext();
		context.getViewRoot().setLocale( Locale.ENGLISH );
	}//end method englishAction
	
	public void vietnamAction() {
		FacesContext context = FacesUtil.getFacesContext();
		context.getViewRoot().setLocale( new Locale( "vn", "VN" ) );
	}//end method vietnameAction
	
	private static final long serialVersionUID = 6377211655893592645L;
}//end class LocaleChanger
